<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.now{
				background: yellow;
			}
			div{
				width:100px;
				height:100px;
				border:1px solid red;
				background: green;
			}
		</style>
		<script src="jquery-1.7.2.min.js"></script>
		<script>
			$(function(){
				$('input').click(function(){
//					如果你没有这个class,那么添加.如果有了,移除
					$('div').toggleClass('now');
				})
			})
		</script>
	</head>
	<body>
		<input type="button" value="切换" />
		<div></div>
	</body>
</html>
